package com.woniuxy.oldobject.controller;

import com.woniuxy.oldobject.entity.ResponseEntity;
import com.woniuxy.oldobject.entity.SalaryRecords;
import com.woniuxy.oldobject.service.SalaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("salary")
public class SalaryControllerr {
    @Autowired(required = false)
    SalaryService salaryService;

//    获取所有的活动
    @RequestMapping("/findAll")
    public ResponseEntity findAllActivity(){
        ResponseEntity responseEntity = salaryService.findAll();
        return responseEntity;
    }

    //    获取所有的活动
    @RequestMapping("/salaryFindById/{id}")
    public ResponseEntity salaryFindById(@PathVariable int id){
        ResponseEntity responseEntity = salaryService.findAll();
        return responseEntity;
    }

    //    获取所有的活动
    @RequestMapping("/changeStateById/{id}")
    public ResponseEntity changeStateById(@PathVariable int id){
        ResponseEntity responseEntity = salaryService.findAll();
        return responseEntity;
    }

    //    获取所有的活动
    @RequestMapping("/batchChangeState")
    public ResponseEntity batchChangeState(@RequestBody int[] ids){
        ResponseEntity responseEntity = salaryService.findAll();
        return responseEntity;
    }

    //    获取所有的活动
    @RequestMapping("/searchSalary")
    public ResponseEntity searchSalary(@RequestBody SalaryRecords search){
        ResponseEntity responseEntity = salaryService.findAll();
        return responseEntity;
    }


}
